﻿using System;
using Caliburn.Micro;
using Microsoft.Phone.Shell;
using Wulong.Phone.Qiushi.i18n;

namespace Wulong.Phone.Qiushi.Views
{
    public partial class NewPostView
    {
        public NewPostView()
        {
            InitializeComponent();
            LoadAppBar();
        }

        private void LoadAppBar()
        {
            // Set the page's ApplicationBar to a new instance of ApplicationBar
            ApplicationBar = new ApplicationBar();
            var doneButton = new AppBarButton
                                 {
                                     IconUri = new Uri("/Toolkit.Content/ApplicationBar.Check.png", UriKind.Relative),
                                     Text = AppResources.V_NewPost_Done_Button,
                                     Message = "SubmitStory"
                                 };
            ApplicationBar.Buttons.Add(doneButton);

            var cancelButton = new AppBarButton
                                   {
                                       IconUri = new Uri("/Toolkit.Content/ApplicationBar.Cancel.png", UriKind.Relative),
                                       Text = AppResources.V_NewPost_Cancel_Button,
                                       Message = "GoBack"
                                   };
            ApplicationBar.Buttons.Add(cancelButton);
        }
    }
}